package com.quatrix.openphantasy.client.ui;

import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.layout.VLayout;

public class CountryView extends VLayout {
	DataSource _ds;
	final ListGrid _grid = new ListGrid();
	
	CountryView() {
		_grid.setAutoFetchData(false);
		
		addMember(_grid);
	}
	
	public void setDataSource(DataSource ds) {
		_ds = ds;
		_grid.setDataSource(ds);
		_grid.fetchData();
	}
	
	public DataSource getDataSource() {
		return _ds;
	}
	
	public static CountryView createWidget() {
		return new CountryView();
	}
}
